package com.center.biz.impl;

import com.center.api.model.EduPraise;
import com.center.api.remote.RemoteEduPraiseService;
import com.center.biz.dao.EduPraiseMapper;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(version = "1.0",interfaceClass = RemoteEduPraiseService.class)
public class RemoteEduPraiseServiceImpl implements RemoteEduPraiseService {

    @Autowired
    private EduPraiseMapper eduPraiseMapper;

    @Override
    public int save(EduPraise eduPraise) {
        return this.eduPraiseMapper.insertSelective(eduPraise);
    }

    @Override
    public int update(EduPraise eduPraise) {
        return this.eduPraiseMapper.updateByPrimaryKeySelective(eduPraise);
    }

    @Override
    public int delete(int id) {
        return this.eduPraiseMapper.deleteByPrimaryKey(id);
    }

    @Override
    public EduPraise getById(int id) {
        return this.eduPraiseMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<EduPraise> select(EduPraise eduPraise) {
        return null;
    }
}
